WOM Job (V1)
Content
Overview
The WOM Job API allows you to Add, Reschedule, Cancel & Update a job of a work order.
Method
The following REST methods are available:
- Adding Jobs
- Rescheduling Jobs
- Cancelling Jobs
- Updating Jobs
Requirements
Authorization API calls All API call request to ideabiz.lk required Authorization headers. Please refer the Token Management (http://docs.ideabiz.lk/Getting_Started/Token_Manegment) document for Authorization.
Request Header
Content-Type: application/json
Authorization: Bearer [access token]
Accept: application/json
Sample Request Header
Content-Type: application/json
Authorization: Bearer a92ba8hjgjhgjh3fa1609cabcd79
Accept: application/json
Add Job
Request
Given below is a sample request of the send service.
URL
https://ideabiz.lk/apicall/WomJob/V1.0/add/{Channel}
Sample URL
https://ideabiz.lk/apicall/WomJob/V1.0/add/WOM
Method
POST
Body
{
"OrderId": 422,
"DepotId": 1,
"TeamId": "TEST_A",
"StartDateTime": "2017-07-26 17:00:00",
"EndDateTime": "2017-07-26 17:30:00",
"JobAddedUser": "WOM_ADMIN",
"Remark": "Test Job"
}
Given below are the Request parameters for WOM Job Addition.
Parameter Name |
Description |
Type |
Mandatory/Optional |
Longitude |
This is the Longitude for the job. |
Float |
Optional |
Latitude |
TThis is the Latitude for the job. |
Float |
Optional |
OrderId |
This is the unique work order ID. |
Numeric |
Mandatory |
DepotId |
This is the allocated depot for the job. |
Numeric |
Mandatory |
TeamId |
This is the job allocated team's ID (Uppercase). |
String |
Mandatory |
StartDateTime |
This is the Start Date and Time for the job. |
Date & Time |
Mandatory |
EndDateTime |
This is the End Date and Time for the job. |
Date & Time |
Mandatory |
JobAddedUser |
This is the job added user's ID. |
String |
Mandatory |
Remark |
This is to state any remarks for the job. |
String |
Optional |
Response
Status code : 201
{
"Description": "Successfully Added a job",
"OrderId": 422,
"JobId": 814,
"TeamId": "TEST_A"
}
Job Reschedule
Request
Given below is a sample request of the send service.
URL
https://ideabiz.lk/apicall/WomJob/V1.0
Sample URL
https://ideabiz.lk/apicall/WomJob/V1.0/reschedule/WOM
Method
POST
Body
{
"OrderId": 422,
"DepotId": 1,
"JobId": 815,
"TeamId": "TEST_A",
"StartDateTime": "2017-07-28 18:00:00",
"EndDateTime": "2017-07-28 18:30:00",
"JobAddedUser": "WOM_ADMIN"
}
Given below are the Request parameters for Rescheduling a WOM Job.
Parameter Name |
Description |
Type |
Mandatory/Optional |
Longitude |
This is the Longitude for the job. |
Float |
Optional |
Latitude |
TThis is the Latitude for the job. |
Float |
Optional |
OrderId |
This is the unique work order ID. |
Numeric |
Mandatory |
DepotId |
This is the allocated depot for the job. |
Numeric |
Mandatory |
JobId |
This is the new Job ID. |
Numeric |
Mandatory |
TeamId |
This is the job allocated team's ID (Uppercase). |
String |
Mandatory |
StartDateTime |
This is the Start Date and Time for the job. |
Date & Time |
Mandatory |
EndDateTime |
This is the End Date and Time for the job. |
Date & Time |
Mandatory |
JobAddedUser |
This is the job added user's ID. |
String |
Mandatory |
Remark |
This is to state any remarks for the job. |
String |
Optional |
Response
Status code : 201
{
"Description": "Successfully Added a job",
"OrderId": 422,
"JobId": 816,
"TeamId": "TEST_A"
}
Job Cancel
Request
Given below is a sample request of the send service.
URL
https://ideabiz.lk/apicall/WomJob/V1.0
Sample URL
https://ideabiz.lk/apicall/WomJob/V1.0/cancel/WOM
Method
POST
Body
{
"OrderId": 422,
"DepotId": 1,
"JobId": 816,
"TeamId": "TEST_A",
"JobAddedUser": "WOM_ADMIN"
}
Given below are the Request parameters for Cancelling a WOM Job.
Parameter Name |
Description |
Type |
Mandatory/Optional |
Longitude |
This is the Longitude for the job. |
Float |
Optional |
Latitude |
TThis is the Latitude for the job. |
Float |
Optional |
OrderId |
This is the unique work order ID. |
Numeric |
Mandatory |
DepotId |
This is the allocated depot for the job. |
Numeric |
Mandatory |
JobId |
This is the Job ID. |
Numeric |
Mandatory |
TeamId |
This is the job allocated team's ID (Uppercase). |
String |
Mandatory |
JobAddedUser |
This is the job added user's ID. |
String |
Mandatory |
Remark |
This is to state any remarks for the job. |
String |
Optional |
Response
Status code : 201
{
"Description": "Successfully Cancelled the job",
"OrderId": 422,
"JobId": 1,
"TeamId": "TEST_A"
}
Job Update
Request
Given below is a sample request of the send service.
URL
https://ideabiz.lk/apicall/WomJob/V1.0
Sample URL
https://ideabiz.lk/apicall/WomJob/V1.0/WOM
Method
PUT
Body
{
"OrderId": 422,
"DepotId": 1,
"JobId": 817,
"TeamId": "TEST_A",
"JobStatus": "END",
"JobCompletionStatus": "REVISIT"
}
Given below are the Request parameters for Updating a WOM Job.
Parameter Name |
Description |
Type |
Mandatory/Optional |
Longitude |
This is the Longitude for the job. |
Float |
Optional |
Latitude |
TThis is the Latitude for the job. |
Float |
Optional |
OrderId |
This is the unique work order ID. |
Numeric |
Mandatory |
DepotId |
This is the allocated depot for the job. |
Numeric |
Mandatory |
JobId |
This is the Job ID. |
Numeric |
Mandatory |
TeamId |
This is the job allocated team's ID (Uppercase). |
String |
Mandatory |
JobStatus |
This is to update the job status. The statuses are Dispatch, Start, End. |
String |
Mandatory |
JobCompletionStatus |
This is to state the Job Completion Status. The statuses are SUCCESS, DELIVERY FAILED, REVISIT. |
String |
Mandatory, if the status is END. |
Remark |
This is to state any remarks for the job. |
String |
Optional |
Response
Status code : 201
{
"Description": "Successfully updated the job",
"OrderId": 422,
"JobId": 816,
"TeamId": "TEST_A"
}